const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')


module.export = {
    entry: {
        // 有多个入口文件，多入口
        app: './src/app.js',
        main: './src/main.js'
    },
    output: {
        path: path.resolve(__dirname, './dist'),
        filename: "js/[name].js",
        clear: true,
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: "./public/index.html",
        })
    ],
    mode: 'production'
}